import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default {
	state: {

		editableTabsValue: 'Desktop',
		editableTabs: [
			{
				title: '首页',
				name: 'Desktop'
			}
		],

		// 菜单栏数据
		menus: [],

		hasRoute: false

	},
	mutations: {

		addTabs(state, tab) {
			console.log(tab)


			// 添加到tabs中
			// state.editableTabs.push(tab)

			// 当前激活的tab
			// state.editableTabsValue = tab.name
		},

		changeRouteStatus(state, hasRoute) {
			state.hasRoute = hasRoute

			sessionStorage.setItem("hasRoute", hasRoute)
		}

	}
}
